home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d8 / tshare.arc / TSHARE.DOC < prev   
Text File  |  1991-01-10  |  13KB  |  327 lines

  1.                    /=========\
  2.                    | T-SHARE |
  3.                    \=========/
  4.         
  5.             Computing Resource Center
  6.             2116 Wilshire Blvd. #202
  7.             Santa Monica, Ca.    90405
  8.             Attn: Marty Ross
  9.  
  10. Release:    2.1, 08/01/84
  11. By:            Marty Ross, at the Computing Resource Center
  12. System:     IBM-PC with standard communications adapter (COM:)
  13. Requirements:    Tested using PC-DOS 2.0/2.1, 128K or larger PC preferred.
  14. Contribution:    Suggested $10.00; puts you on CRC mailing list.
  15.  
  16. Abstract:    TSHARE is a demonstration terminal emulator, showing the
  17.         capability of the IBM-PC to multitask, in a practical way.
  18.  
  19. Distribution:    I am distributing this preliminery version freely,
  20.         in hopes to stimulate interest and feedback.  No fee
  21.         may be charged, and this document must accompany the
  22.         program(s) documented herein. 
  23.  
  24. Description:    TSHARE is a "background" terminal emulator.  Unlike most
  25.         "terminal" programs for the IBM-PC which 'tie up' the
  26.         computer, TSHARE, once activated, can be used simultaneously
  27.         with almost any other application.
  28.  
  29. Features:    Other than its ability to share the IBM-PC with "foreground"
  30.         tasks, TSHARE supports a 'typeahead line turnaround protocol',
  31.         which may be used on many IBM mainframe systems (e.g. VM/SP)
  32.         to enable a 'typeahead' capability.  Also, HALF DUPLEX operation
  33.         may be selected for systems which don't 'echo' characters sent.
  34.         Thirdly, it is possible to disable the effect of incoming BELL
  35.         characters, in case you wish to be discrete about your terminal
  36.         voyages on systems which make liberal use of bells (a feature
  37.         which should have been built into the PC, in my opinion).  The
  38.         last "feature" I will mention really should be a requirement for
  39.         any "terminal" program: the ability to transmit a "BREAK" signal
  40.         to the host computer (required by many half duplex hosts which
  41.         cannot 'watch' for control characters like ^C and ^S).
  42.  
  43. Usage:        TSHARE is distributed in two parts: "NEW14H.COM", which, by     
  44.         itself, provides a powerful enhancement to the communication 
  45.         ability of the IBM-PC using its async (COM:) adapter, and 
  46.         "TSHARE.COM", the 'application' component.
  47.  
  48.         To refresh your memory after learning about TSHARE, or for
  49.         complete syntax rules for activating TSHARE, type "TSHARE ?"
  50.         in DOS for a help screen.  The same applies to the "NEW14H" 
  51.         program.
  52.  
  53.         There are four steps necessary to activate TSHARE so that
  54.         it may be used as a terminal emulator:
  55.  
  56.             1.)  Initialize PC-DOS
  57.             2.)  Install the NEW14H communication enhancements
  58.             3.)  Install the TSHARE application component
  59.             4.)  Initialize the COM: port for desired baud/parity
  60.                  (TSHARE DOES NOT DO THIS: USE PC-DOS "MODE.COM")
  61.  
  62.         A typical installation sequence (which can be combined into
  63.         a .BAT file, such as "AUTOEXEC.BAT"):
  64.  
  65.  
  66.         +---------------------------------------------------------+
  67.         |                              |
  68.        (1)    |    <ALT>+<CTL>+<DEL> ...                  |
  69.         |                              |
  70.         |    IBM Disk Operating System              |
  71.         |    Version 2.xx ...                  |
  72.         |                              |
  73.        (2)    |    A>new14h                      |
  74.         |    NEW14H - 2.x - 08/01/84 - M.Ross @CRC, (C) 1984      |
  75.         |    Auxiliary COM1: port driver active.          |
  76.         |                              |
  77.        (3)    |    A>tshare                      |
  78.         |    TSHARE - 2.x - 08/01/84 - M.Ross @CRC, (C) 1984      |
  79.         |    (Using NEW14H enhancements ver 2.x)          |
  80.         |                              |
  81.        (4)    |          A>mode com1:300,n,8                  |
  82.         |                              |
  83.         |    A>rem TSHARE can now be "called up" anytime until |    
  84.         |    A>rem we re-boot (CTL+ALT+DEL), by pressing       |
  85.         |    A>rem '<SHIFT>+[PrtSc]', unless another program      |
  86.         |    A>rem redefines our interrupts.              |
  87.         |                              |
  88.         +---------------------------------------------------------+
  89.                     Figure 1.
  90.     
  91.     Notice that after "running" the TSHARE program, we came back to PC-DOS.
  92.     To reiterate, TSHARE works "in the background", and is transparent to
  93.     the PC-DOS user, until he switches into "terminal mode".  From any 
  94.     subsequent environment[1], terminal mode may be entered by pressing
  95.     the <SHIFT>+[PrtSc] keys together[2].  For example, while assembling
  96.     a lengthy program using the Macro Assembler, if TSHARE is active, 
  97.     press <SHIFT>+[PrtSc], and initiate a terminal session:
  98.  
  99.         +---------------------------------------------------------+
  100.         |                              |
  101.         |    A>masm myprog                      |
  102.         |    Object file [MYPROG.OBJ]:              |
  103.         |    Listing file [NUL]:                  |
  104.         |    Cross Reference [NUL]:                  |
  105.         |                              |
  106.             |    T-Share: ON                      |
  107.         |                              |
  108.         |    AT TD 1-213-829-1487                  |
  109.         |    CONNECT                          |
  110.         |                              |
  111.         |    CRC-PC online                      |
  112.         |                              |
  113.         +---------------------------------------------------------+
  114.                     Figure 2.
  115.         
  116.     First, we started our "foreground task" (the assembler), then we
  117.     switched into terminal mode by pressing <SHIFT>+[PrtSc].  TSHARE
  118.     indicated our "terminal" status, and immediately placed us online
  119.     (in example, to a Hayes Modem), from where we can start/continue
  120.     our current terminal session.  
  121.  
  122.     Note that if the foreground task sends output to the screen, it will
  123.     be interleaved with our terminal output.  In future versions, it may 
  124.     be possible to re-route, ignore, or accumulate foreground output.
  125.     It would be easy to implement a "split-screen" where a given portion
  126.     of the screen would be 'dedicated' to terminal output, while the rest
  127.     will display the output from the foreground task (see 'Directions:').
  128.  
  129.     If we switch back to the foreground task (get out of terminal mode)
  130.     before concluding our terminal session, then any data which comes in
  131.     over the communication line is saved (because of NEW14H interrupt
  132.     facilities: up to 32K of data), and will be quickly displayed by
  133.     TSHARE, until it is 'caught up' with the incoming data.  To 'freeze'
  134.     the fast display of buffered data, use <Ctrl>+<S>.  Any character
  135.     will cause the listing to resume.  
  136.  
  137.     In order to transmit a BREAK signal (approx 500 millisecond MARK
  138.     state), while in terminal mode only, use the <Ctrl>+[Break] key
  139.     pair.  In terminal mode, this action does not affect the foreground 
  140.     task.
  141.  
  142.  
  143. Why TSHARE?:    TSHARE was written because I do alot of compilation using
  144.         a good, but slow compiler.  I purchased a COM: port in order
  145.         to facilitate my interaction with our large computer at work,
  146.         only to find that I really needed an extra terminal for use
  147.         when my PC was busy churning away on my programs.  I found it
  148.         unforgivable that none of the other "popular" terminal programs
  149.         would use the (almost) wonderful multi-tasking capabilities of
  150.         the IBM-PC, and therefore my investment in additional hardware
  151.         was less attractive because I couldn't use it most of the time!
  152.         By using the communication interrupts (NEW14H), and a simple
  153.         byte multiplexor scheme (TSHARE uses the PC-BIOS timer inter-
  154.         rupt), these goals were easily achieved with a few hours of
  155.         assembly programming.
  156.  
  157. Future        Future versions of TSHARE will necessarily incorporate a
  158.   Directions:    file transfer protocol; perhaps XMODEM.  Also, ANSI emulation
  159.         is on the agenda since full-screen support over low speed lines
  160.         will shortly be available for our VM/SP system.  Thus, IBM
  161.         3270 style communication or other 'formatted screen' support
  162.         will be possible.  Alternatively, a "terminal window" can
  163.         be used so that both foreground and "background" tasks can
  164.         be monitored on the same screen, without confusion, as may
  165.         result with this version's scheme of interleaving both
  166.         terminal and foreground output.
  167.  
  168. Disclaimer:    Though I've tested TSHARE under varying conditions, I cannot
  169.         guarantee that TSHARE will work in every case/PC configuration.
  170.         Also, I suggest you use caution when using TSHARE in new
  171.         situations (foreground programs, etc): I will not be liable
  172.         for any damage caused, but would like to be informed if any
  173.         undesireable TSHARE interactions occur.  Please write me.
  174.  
  175. About the Author:
  176.  
  177.         Marty Ross is a consultant for the Computing Resource Center,
  178.         a Santa Monica based data processing firm.  CRC uses the IBM
  179.         VM/SP operating system to provide its clients with an inter-
  180.         active method to access popular data handling facilities,
  181.         such as SAS, PL/1, FORTRAN, and the On-Line Data System, CRC's
  182.         own database management product.  Recently, CRC has purchased
  183.         IBM-PC's to link many of its remote clients to the mainframe 
  184.         system.  To facilitate compatibility with other microcomputers
  185.         and terminals, CRC has operated a public access DEMOnstration 
  186.         account and bulletin board system where    anyone with a terminal
  187.         can call to find out about our services, rates, or expertise.
  188.         Because of this, keep your eye out for more communication
  189.         software from CRC: especially if interested in the elusive
  190.         "micro -> mainframe link" which seems to be in a state of
  191.         constant re-definition in other data processing circles.
  192.  
  193.  
  194. ----------------------------
  195.  
  196. [1]  NEW14H, and therefore TSHARE will be destroyed by programs such as BASIC 
  197.      or BASICA which re-define the communication interrupt driver(s).  Also,
  198.      only "nice" programs which do not 'steal' the keyboard, video, PrtSc,
  199.      or timer interrupts may be used successfully with TSHARE.
  200.  
  201. [2]  Perhaps it is unfortunate that TSHARE uses the <SHIFT>+[PrtSc] key
  202.      thus disabling it as a "print screen" function.  Remember, however;
  203.      this is only a demonstration program and was not written with profes-
  204.      sional intent.  If enough interest is shown, future versions will 
  205.      be released to those contributing new ideas, free of charge.
  206.  
  207. -----------------------------
  208.  
  209.                    /=========\
  210.                    | T-SHARE |
  211.                    \=========/
  212.  
  213.                 Comments?   
  214.                 Can you use TSHARE?  
  215.  
  216.  
  217. Name:       _________________________________________________________
  218.  
  219.  
  220. Address:    _________________________________________________________
  221.  
  222.             _________________________________________________________
  223.  
  224.             _________________________________________________________
  225.  
  226.  
  227.         ---------------------------------------------------------
  228.         
  229.  
  230. Comments:   _________________________________________________________
  231.  
  232.             _________________________________________________________
  233.  
  234.             _________________________________________________________
  235.  
  236.             _________________________________________________________
  237.  
  238.             _________________________________________________________
  239.  
  240.             _________________________________________________________
  241.  
  242.             _________________________________________________________
  243.  
  244.             _________________________________________________________
  245.  
  246.             _________________________________________________________
  247.  
  248.             _________________________________________________________
  249.  
  250.             _________________________________________________________
  251.  
  252.  
  253.     If you feel TSHARE contributes to your effectiveness, then please let
  254.     me know by sending a donation of $10.00 or whatever you feel is ap-
  255.     propriate.  TSHARE was developed in my spare time, and is now not a
  256.     commercial effort of CRC.  I will continue to develop products like
  257.     TSHARE for those who show interest - provided I can afford it.  Users
  258.     who make contributions will be entitled to a single sided diskette
  259.     of other utilities I've developed while at CRC: please include your
  260.     name and return address when sending donations!
  261.  
  262. oneed:        ret
  263. adv_bf        endp
  264. ;
  265. ; Advance Xbf:  Same as above, for output buffer.
  266. ;
  267. adv_xbf        proc    near
  268.         inc    di
  269.         cmp    di,offset xbuffer_end
  270.         jc    noneedx
  271.         mov    di,offset xbuffer    ; wrap if at end of buffer
  272. noneedx:    ret
  273. adv_xbf        endp
  274. ;
  275. ;
  276. cbr:        jmp    combreak
  277. cmt:        jmp    comout
  278. sbt:        jmp    status_bytes
  279. cfl:        jmp    comflush
  280. sbp:        jmp    setbp
  281. ;
  282. ; New Int14H:  Our code which intercepts INT14, AH=0, 1, 2, 3, and added fncs.
  283. ;
  284. new_int14h    proc    far
  285.         sti
  286.         push    ds
  287.         getcode
  288.         cmp    dl,com_port        ; is request for our device?
  289.         jnz    get_out            ; not us, get out!
  290.         or    dh,dh            ; or invalid port #?
  291.         jnz    get_out            ; get out!
  292. ; right device -- now check for supported function (to intercept)
  293.         cmp    ah,c_activity        ; is it 'com active?'
  294.         jz    comactive
  295.         cmp    ah,bf_hit        ; is it 'any chars in buf' ?
  296.         jz    bfhit
  297.         cmp    ah,chkbuf_code        ; or 'check buffer' ?
  298.         jz    comrdy
  299.         cmp    ah,send_code        ; is it 'send character' ?
  300.         jz    cmt
  301.         cmp    ah,recv_code        ; is it 'receive character' ?
  302.         jz    recv_byte
  303.         cmp    ah,status_code        ; is it 'port status' ?
  304.         jz    sbt
  305.         cmp    ah,length_code        ; is it one of our functions ?
  306.         jz    leng            ; get length code?
  307.         cmp    ah,flush_code        ; or 'flush buffer' ?
  308.         jz    cfl
  309.         cmp    ah,break_code        ; or 'send break signal' ?
  310.         jz    cbr
  311.         cmp    ah,read_id        ; or 'read identification' ?
  312.         jz    return_id
  313.         cmp    ah,reset_ints        ; or 'reset interrupt system' ?
  314.         jz    rst_int
  315.         cmp    ah,init_code        ; or 'set baud/parity' ?
  316.         jz    sbp
  317.         jmp    get_out
  318. ;
  319. ; unsupported function -- pass it to old the old INT14h handler
  320. get_out:    pop    ds
  321.         jmp    cs:old_int14h        ; go to old int 14 handler
  322. ;
  323. leng:        call    get_length        ; retn # chars in cominput buff
  324. retds:        pop    ds
  325.         iret
  326. ;
  327. ; COM_ACTIVE: